import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";

import router from "@/routers/index";
import pinia from "@/stores/index";
import { i18n } from "@/locales/index";

import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

import "uno.css";
import "element-plus/theme-chalk/dark/css-vars.css";
import "./styles/theme.scss"; // 引入主题样式

// svg图标
import "virtual:svg-icons-register";
import "./assets/iconfont/iconfont.css";

import { safeT } from "@/locales/index";
import directives from "./directives";

const app = createApp(App);

app.config.globalProperties.$safeT = safeT;

// 全局注册element图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(pinia).use(router).use(ElementPlus).use(i18n).use(directives).mount("#app");
